package smart.src;

import java.sql.Connection;

import org.openswing.swing.mdi.client.InternalFrame;
import org.openswing.swing.mdi.client.MDIFrame;
import org.openswing.swing.util.java.Consts;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import org.openswing.swing.client.EditButton;
import org.openswing.swing.client.SaveButton;
import org.openswing.swing.client.ExportButton;
import org.openswing.swing.client.DeleteButton;
import org.openswing.swing.client.CopyButton;
import org.openswing.swing.client.ReloadButton;
import org.openswing.swing.client.InsertButton;
import org.openswing.swing.client.NavigatorBar;
import org.openswing.swing.form.client.Form;
import java.awt.GridBagLayout;
import org.openswing.swing.client.LabelControl;
import java.awt.GridBagConstraints;
import java.awt.Insets;
import org.openswing.swing.client.TextControl;
import org.openswing.swing.client.TextAreaControl;
import org.openswing.swing.client.ComboBoxControl;
import org.openswing.swing.client.DateControl;
import javax.swing.border.TitledBorder;
import org.openswing.swing.client.CodLookupControl;
import org.openswing.swing.client.GenericButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Color;
import java.awt.SystemColor;
import java.io.Serializable;
import org.openswing.swing.client.ComboBoxVOControl;

import com.j256.ormlite.support.ConnectionSource;

import javax.swing.SwingConstants;


public class AccountDetailFrame extends InternalFrame {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	JPanel panel = new JPanel();

	InsertButton insertButton = new InsertButton();

	EditButton editButton = new EditButton();

	SaveButton saveButton = new SaveButton();

	CopyButton copyButton = new CopyButton();

	ReloadButton reloadButton = new ReloadButton();

	ExportButton exportButton = new ExportButton();

	DeleteButton deleteButton = new DeleteButton();
	private Form accountForm = new Form();
	private Form cardForm = new Form();
	AccountDetailFrameController accountController;
	CardDetailFrameController cardController;
	ConnectionSource connectionSource;
	private final ClientForm clientForm = new ClientForm();
	private final CardForm cardForm_1 = new CardForm();

	
	public AccountDetailFrame( ConnectionSource conn, AccountDetailFrameController aController,CardDetailFrameController cController) {
		connectionSource = conn;
		jbInit();
		accountForm.setFormController(aController);
		cardForm.setFormController(cController);
			
	}
	
	private void jbInit()
	{
		BorderLayout borderLayout = (BorderLayout) getContentPane().getLayout();
		borderLayout.setVgap(10);
		borderLayout.setHgap(10);
		GridBagLayout gridBagLayout = (GridBagLayout) clientForm.getLayout();
		gridBagLayout.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
		
		getContentPane().add(clientForm, BorderLayout.CENTER);
		
		getContentPane().add(cardForm_1, BorderLayout.SOUTH);
		
		
	}
}
